public class Test010 {
    public static void main(String[] args) {
        boolean ret = fac(7);
        System.out.println(ret);
    }
    public static boolean fac(int num) {
        for (int i = 2; i <num; i++) {
            if(num % i ==0) {
                System.out.println("不是素数！");
                return false;
            }
        }
        System.out.println("是素数！");
        return true;
    }
}